// window.JStInterface.showToast() 
// window.webkit.messageHandlers.showToast.postMessage({body:"1"}) 
import {isAndroid,isApple} from '@/utils'

export function nativeToast (message) {
	(isAndroid() && window.JStInterface.showToast(message)) || (isApple() && window.webkit.messageHandlers.showToast.postMessage({body:message}))
}
export function nativeBack () {
	(isAndroid() && window.JStInterface.back()) || (isApple() && window.webkit.messageHandlers.back.postMessage({body:''}))
}
export function nativeComplete (state) {
	(isAndroid() && window.JStInterface.complete(state)) || (isApple() && window.webkit.messageHandlers.complete.postMessage({body:state}))
}
export function nativeCheckCurrent (id) {
	(isAndroid() && window.AndroidWebView.ClickOnTheTitle(id)) || (isApple() && window.webkit.messageHandlers.ClickOnTheTitle.postMessage({body:id}))
}
export function nativeCheckAll (id) {
	(isAndroid() && window.AndroidWebView.ViewTheDetails(id)) || (isApple() &&window.webkit.messageHandlers.ViewTheDetails.postMessage({body:id}))
}